package x.ovo.wechat.bot.common.entity.event;

import lombok.Getter;
import x.ovo.wechat.bot.common.command.Command;
import x.ovo.wechat.bot.common.entity.message.TextMessage;

/**
 * 命令事件
 *
 * @author ovo on 2024/05/09.
 * @since 1.0.0
 */
@Getter
public class CommandEvent extends MessageEvent<TextMessage> {

    private final Command command;

    public CommandEvent(TextMessage source) {
        super(source);
        this.command = new Command(source.getContent(), source.getFromName());
    }
}
